import Vue from 'vue'
import SvgIcon from '@/components/SvgIcon' // svg组件

// register globally
Vue.component('svg-icon', SvgIcon);

const requireAll = requireContext => requireContext.keys().map(requireContext);
const req = require.context('./svg', false, /\.svg$/);
const iconModules = requireAll(req);
const icons = [];
iconModules.forEach(m => icons.push(m.default.id.replace('icon-', '')));

export default icons;
